<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<form:form method="post" action="register" commandName="registerAcc"
	autocomplete="false">
	<form:errors path="*" cssClass="errorblock" element="div" />

	<div class="allElements">
		<h2>
			<spring:message code="personalinfo" />
			<span></span>
		</h2>
		<div class="registerElement">
			<label><spring:message code="fullname" /></label>
			<form:input path="name" class="registerInput" cssErrorClass="registerInput error"/>
		</div>
		<div class="registerElement">
			<label><spring:message code="birthday" /></label>
			<form:input class="datepicker" path="birthday"  cssErrorClass="datepicker error"/>
		</div>

		<h2 style="margin-top: 24px; margin-bottom: 30px;">
			<spring:message code="accountinfo" />
			<span></span>
		</h2>

		<div class="registerElement">
			<label><spring:message code="username" /></label>
			<form:input class="registerInput" path="userName"
				autocomplete="false" cssErrorClass="registerInput error"/>

			<button id="btnRegisterUsernameChecking"
				onclick="checkUsername(); return false;">
				<spring:message code="check" />
			</button>
			<span id="checkMessage" style="position: relative; left: 380px; top: 5px;"></span>
		</div>
		<div class="registerElement">
			<label><spring:message code="password" /></label>
			<form:password class="registerInput" path="userPassword"
				autocomplete="false" cssErrorClass="registerInput error"/>
		</div>
		<div class="registerElement">
			<label><spring:message code="confirmpassword" /></label>
			<form:password class="registerInput" path="confirmPassword"
				autocomplete="false" cssErrorClass="registerInput error"/>
		</div>
		<input class="btnSubmit" type="submit"
			value="<spring:message code="register" />" />
	</div>
</form:form>